sc stop nsqd_1
sc stop nsqd_2
sc stop nsqlookupd_1
sc stop nsqlookupd_2
sc stop nsqlookupd_3

sc delete nsqd_1
sc delete nsqd_2
sc delete nsqlookupd_1
sc delete nsqlookupd_2
sc delete nsqlookupd_3


sc create nsqlookupd_1 binpath= "c:\nsq\nsqlookupd.exe -tcp-address=0.0.0.0:4160 -http-address=0.0.0.0:4161" start= auto DisplayName= "nsqlookupd_1"
sc description nsqlookupd_1 "nsqlookupd 1.1.0"
sc start nsqlookupd_1

sc create nsqlookupd_2 binpath= "c:\nsq\nsqlookupd.exe -tcp-address=0.0.0.0:4162 -http-address=0.0.0.0:4163" start= auto DisplayName= "nsqlookupd_2"
sc description nsqlookupd_2 "nsqlookupd 1.1.0"
sc start nsqlookupd_2

sc create nsqlookupd_3 binpath= "c:\nsq\nsqlookupd.exe -tcp-address=0.0.0.0:4164 -http-address=0.0.0.0:4165" start= auto DisplayName= "nsqlookupd_3"
sc description nsqlookupd_3 "nsqlookupd 1.1.0"
sc start nsqlookupd_3


mkdir d:\nsq\node1
sc create nsqd_1 binpath= "c:\nsq\nsqd.exe -mem-queue-size=300 -http-address=0.0.0.0:4151 -tcp-address=0.0.0.0:4150 -lookupd-tcp-address=127.0.0.1:4160,127.0.0.1:4162,127.0.0.1:4164 -data-path=d:\nsq\node1" start= auto DisplayName= "nsqd_1"
sc description nsqd_1 "nsqd 1.1.0  node1"
sc start nsqd_1

mkdir d:\nsq\node2
sc create nsqd_2 binpath= "c:\nsq\nsqd.exe -mem-queue-size=300 -http-address=0.0.0.0:4153 -tcp-address=0.0.0.0:4152 -lookupd-tcp-address=127.0.0.1:4160,127.0.0.1:4162,127.0.0.1:4164 -data-path=d:\nsq\node2" start= auto DisplayName= "nsqd_2"
sc description nsqd_2 "nsqd 1.1.0  node2"
sc start nsqd_2
